package com.example.plan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * AR导航标记表
 * @TableName ar_navigation
 */
@TableName(value ="ar_navigation")
@Data
public class ArNavigation implements Serializable {
    /**
     * 导航标记ID
     */
    @TableId(value = "nav_id", type = IdType.AUTO)
    private Long nav_id;

    /**
     * 关联订单ID
     */
    @TableField(value = "order_id")
    private Long order_id;

    /**
     * 无人机ID
     */
    @TableField(value = "drone_id")
    private Long drone_id;

    /**
     * 虚拟标记类型
     */
    @TableField(value = "marker_type")
    private Object marker_type;

    /**
     * 标记位置经纬度
     */
    @TableField(value = "marker_coords")
    private Integer marker_coords;

    /**
     * 激活时间
     */
    @TableField(value = "activated_at")
    private Date activated_at;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ArNavigation other = (ArNavigation) that;
        return (this.getNav_id() == null ? other.getNav_id() == null : this.getNav_id().equals(other.getNav_id()))
            && (this.getOrder_id() == null ? other.getOrder_id() == null : this.getOrder_id().equals(other.getOrder_id()))
            && (this.getDrone_id() == null ? other.getDrone_id() == null : this.getDrone_id().equals(other.getDrone_id()))
            && (this.getMarker_type() == null ? other.getMarker_type() == null : this.getMarker_type().equals(other.getMarker_type()))
            && (this.getMarker_coords() == null ? other.getMarker_coords() == null : this.getMarker_coords().equals(other.getMarker_coords()))
            && (this.getActivated_at() == null ? other.getActivated_at() == null : this.getActivated_at().equals(other.getActivated_at()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getNav_id() == null) ? 0 : getNav_id().hashCode());
        result = prime * result + ((getOrder_id() == null) ? 0 : getOrder_id().hashCode());
        result = prime * result + ((getDrone_id() == null) ? 0 : getDrone_id().hashCode());
        result = prime * result + ((getMarker_type() == null) ? 0 : getMarker_type().hashCode());
        result = prime * result + ((getMarker_coords() == null) ? 0 : getMarker_coords().hashCode());
        result = prime * result + ((getActivated_at() == null) ? 0 : getActivated_at().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", nav_id=").append(nav_id);
        sb.append(", order_id=").append(order_id);
        sb.append(", drone_id=").append(drone_id);
        sb.append(", marker_type=").append(marker_type);
        sb.append(", marker_coords=").append(marker_coords);
        sb.append(", activated_at=").append(activated_at);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}